import {BandwidthGroupsForm} from "@/api/bandwidthgroups/types";
import request from "@/utils/request";
import {AxiosPromise} from "axios";
import {Result} from "@/model";


/**
 * 插入带宽和安全组
 * @param data 条件
 * @return id
 */
export function insertGroups(data: BandwidthGroupsForm): AxiosPromise<Result<number>> {
    return request({
        url: "/dome/groups/add",
        method: "post",
        data,
    });
}

/**
 * 更新带宽值
 */
export function updateGroups(data: BandwidthGroupsForm): AxiosPromise<Result<null>> {
    return request({
        url: "/dome/groups/update",
        method: "put",
        data,
    });
}